package com.yvon.maple.cloud.api.msg.vo;

import com.yvon.maple.enums.MessageCategory;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

/**
 * @author : Yvon
 * @since : 2021-10-28
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@ApiModel("远程发送消息参数")
public class MsgVo implements Serializable {

    /**
     * 类型标识
     */
    @ApiModelProperty(value = "类型标识")
    private String typeCode;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    private String title;


    /**
     * Variables
     */
    @ApiModelProperty(value = "参数")
    private List<String> variables;

    /**
     * 消费者
     */
    @ApiModelProperty(value = "消费者")
    private Set<String> consumers;


    /**
     * 消费角色（当消费者不为空时，该参数无效）
     */
    @ApiModelProperty(value = "消费角色（当消费者不为空时，该参数无效）")
    private List<String> roles;

    /**
     * 额外信息
     */
    @ApiModelProperty(value = "额外信息")
    private String extras;

    /**
     * 消息发送策略（当消费者不为空时，该参数生效）.
     */
    @ApiModelProperty(value = "消息发送策略（当消费者不为空时，该参数生效）")
    private Set<MessageCategory> messageCategories;
}
